<template>
	<view class="agreement">
		<feng-parse :content='content'></feng-parse>
	</view>
</template>

<script>
	import {
		protocol
	} from '@/commen/js/config'
	import fengParse from '@/components/feng-parse/parse'
	import storage from '@/commen/utils/storage'
	
	export default {
		data() {
			return {
				content: '' // 富文本
			};
		},
		mounted() {
			this.getAgreement()
		},
		components:{
			fengParse
		},
		methods: {
			// 获取协议
			async getAgreement() {
				const params = {
					root: true
				}
				const [err, res] = await protocol(params)
				if (res) {
					this.content = res.info.member_protocol
				}
			}
		}
	}
</script>

<style lang="scss">
	@import '@/static/scss/config.scss';
	@import '@/static/scss/mixin.scss';
	
	.agreement{
		width:100%;
		padding:25rpx;
	}
</style>
